<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <!-- 2.准备容器 -->
    <div id="app">
        <!-- v-for="(item,index) in 数组" -->
        <ul>
            <li v-for="(item,index) in foods">{{item}}</li>
        </ul>

        <!-- 用不到index的时候，简写 -->
        <ul>
            <li v-for="item in foods">{{item}}</li>
        </ul>
    </div>

    <!-- 1。导入vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

    <script>
        <!-- 3. 创建Vue实例对象 -->
        const app = new Vue({
            // < !--容器 -->
            el: "#app",
            data: {
                foods: ["11", "22", "33", " 44", "55", "66"]
            },
            methods: {
                //
            },
        });
    </script>
</body>

</html>